package com.dwr;

import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;

import com.spring.service.message.MessageService;
import com.struts.form.MessageForm;

public class DwrMessage {

	
private MessageService messageService=null;
	
	
	public void saveMessage(Map formMap)
	{
		MessageForm mf=new MessageForm();
		try
		{
			BeanUtils.populate(mf, formMap); 
			messageService.saveMessage(mf);
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
	}
	
	
	
	

	public MessageService getMessageService() {
		return messageService;
	}

	public void setMessageService(MessageService messageService) {
		this.messageService = messageService;
	}
}
